Skip to content

Carry the OpenTelemetry metrics onto re-dev (upstream #1540 to #1548) - #124

Merged
gedaiu merged 8 commits into
re-devfrom
carry/otel-metrics
Nov 28, 2026
Merged

gedaiu merged 8 commits into
re-devfrom
carry/otel-metrics

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 28, 2026

Copy link
Copy Markdown

Carries the whole OpenTelemetry stack onto re-dev ahead of upstream: deeplethe/utopia deeplethe#1540, deeplethe#1541, deeplethe#1543, deeplethe#1545, deeplethe#1546, deeplethe#1547 and deeplethe#1548 (issue deeplethe#1539), merged as one branch (feat/otel-job-outcomes, the top of the stack). When upstream merges them, the next sync goes through without a change.

What re-dev gets, all off unless OTEL_EXPORTER_OTLP_ENDPOINT is set:

  • traces through a tracing-opentelemetry layer, and an OTLP metrics exporter (OTEL_SERVICE_NAME defaults to utopia-server)
  • utopia.jobs.queue.size and utopia.jobs.queue.oldest_wait per base, lane and status, from one grouped query every 30s
  • utopia.llm.call.duration and utopia.llm.tokens per model, task, base and outcome (ok or the error class), from every client path and every call site except the settings connection check
  • utopia.jobs.completed and utopia.jobs.duration per kind, base and outcome (ok, retry, failed), from the decision the worker persists

Seven files conflicted, all where our new code met comments re-dev already had in English. Each resolves to our code with re-dev's English text. In main.rs the interactive pool (#116) and the metrics setup both stay: the state is built with with_interactive_pool and then gets model_calls and jobs. Two Chinese doc comments from the stack are translated, so this adds no Chinese.

Tested on a fresh database (utopia_carry): fmt and clippy with -D warnings clean, store, core and llm suites green, server 910 passed.

Deploying still needs the collector address in deploy/clusters/internal-cluster.values.yaml; this PR doesn't touch deploy values.

…when OTEL_EXPORTER_OTLP_ENDPOINT is set (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ane and status (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ing with adjudication (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ns and outcome, and extraction reports per base (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…e stream ends, and chat reports per base (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
… show up next to extraction and chat (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ry/otel-metrics

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>

# Conflicts:
#	crates/utopia-llm/src/lib.rs
#	crates/utopia-server/src/governance.rs
#	crates/utopia-server/src/main.rs
#	crates/utopia-server/src/ontology_index.rs
#	crates/utopia-server/src/pipeline.rs
#	crates/utopia-server/src/time_resolution.rs
#	crates/utopia-store/src/jobs.rs
@lore-agent

lore-agent Bot commented Nov 28, 2026

Copy link
Copy Markdown

Lore is reviewing this PR — 84494ebb-feaa-4633-b001-3f06f430bbaa.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lore review — Approved

Clean carry of the upstream OpenTelemetry metrics series (deeplethe#1540–deeplethe#1548) onto re-dev; one non-blocking suggestion to observe the fork-only embed_names job.

Must fix (0) · Consider (1) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Notes on lines outside changed hunks

crates/utopia-server/src/extraction_open.rs:1028 — suggestion: wrap the fork-only embed_names_job embed client with state.observed so name-vector backfill calls report under kb_id too

    let Some(client) =
        crate::llm_util::embed_client(&settings).map(|client| state.observed(client, kb_id))
    else {

Posted by floor, visit fc4e0f77-9beb-49a1-9f00-0abfaf78549a.

@gedaiu
gedaiu merged commit 6bf046c into re-dev Nov 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant